package pl.koziolekweb.szkola.DWWlasciwosciPlikow;

// DW-WlasciwosciPlikow/Wlasciwosci.java
 
import java.io.File;

public class Wlasciwosci {

    public static void main(String[] args) {
        new Wlasciwosci();
    }

    public Wlasciwosci() {
        File file = new File("Wlasciwosci.java");
        System.out.print("Plik "  + file +
            "\nexists:          " + file.exists() +
            "\nisfile:          " + file.isFile() +
            "\nisDirectory:     " + file.isDirectory() +
            "\ncanRead:         " + file.canRead() +
            "\ncanWrite:        " + file.canWrite() +
            "\ngetName:         " + file.getName() +
            "\ngetAbsolutePath: " + file.getAbsolutePath() +
            "\nlength:          " + file.length() +
            "\nlastModified:    " + file.lastModified());
        long tim = file.lastModified();
        System.out.printf(" czyli %td %1$tB, %1$tY\n",tim);
    }
}
